package com.my.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.ModelAttribute;

import com.my.service.DbService;

public class mybaseAction {
	 // 自动注入属性
    @Autowired 
    DbService prdDbService;
    protected HttpServletRequest request;
    protected HttpServletResponse response;
    protected HttpSession session;
    // 每次action请求都会调用该方法
     @ModelAttribute
     public void setReqAndRes(HttpServletRequest request, HttpServletResponse response){
         this.request = request;
         this.response = response;
         this.session = request.getSession();
     }
}
